home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / sviluppo / svilupp2 / istar.lha / Docs / KBs < prev    next >
Text File  |  1996-11-06  |  8KB  |  160 lines

  1. MANIPULATING KNOWLEDGE BASES
  2.  
  3. This chapter describes how to manipulate whole knowledge bases in Istar. 
  4. It also describes the Preferences that can be read in.  Some of the 
  5. information is found also e.g. in sections on Panels.
  6.  
  7. OBTAINING A KB
  8.  
  9. There are at present two ways in which a KB can be obtained: create a new 
  10. one or get (load) one from disk.  Both these facilities are available on 
  11. the Initial Control Panel, via the New and GetKB buttons respectively.  For 
  12. every KB you obtain a KB panel will appear, showing its name, and an Easel 
  13. will be created.
  14.  
  15.       To get (load, open) an existing KB, click the GetKB button.  You will
  16. be asked to specify the name of the file holding the KB, normally by a 
  17. normal ASL requester.  When you start up, this requester will show a drawer 
  18. assigned to 'KBTools:' if available, or whatever is your current drawer if 
  19. not.  Normally the KBTools drawer has within it a drawer called 'KBs' 
  20. (knowledge bases) and normally your KBs are in this.  Click it, and you 
  21. should obtain a list of KBs.  Double click on one of these, and it will be 
  22. loaded and its easel opened.  A panel will appear for this KB.
  23.  
  24.       To create a new KB, click the New button.  A new KB and easel will be
  25. created according to parameters available in the Prefs panel.  If you do 
  26. not want the default parameters, then you should bring up the Prefs panel 
  27. (by clicking the Prefs button) before clicking the New button.  The 
  28. parameters you can change include:
  29.  
  30.       #  Name of KB
  31.       #  Min size of KB
  32.       #  Expansion percentage
  33.       #  Size and depth of Easel
  34.  
  35.       Warning:  Do not bring up more than two KBs with standard size Easel
  36. (30 by 24 inches) since three such Easels use up all your Chip memory, to 
  37. the extent that you cannot even quit - because there is not enough Chip 
  38. memory for the panel that asks you whether to quit or not!
  39.  
  40.  
  41. CHANGING YOUR KB
  42.  
  43. Once you have a KB up and active, with a KB panel, you can:
  44.  
  45.       #  Save it (Save and SaveAs)
  46.       #  Examine its details
  47.       #  Rename it
  48.       #  Resize it
  49.       #  Resize its Easel
  50.       #  Get rid of it.
  51.  
  52.       To SaveAs, click the SaveAs button on the KB panel.  You will be
  53. asked for a file name, usually with the ASL requester.  If the file exists 
  54. you will be asked whether to override it or not.  If your KB has never been 
  55. saved before, you will be asked whether to make this file the DiskVersion.
  56.  
  57.       The DiskVersion of a KB is the disk file to which it is saved and
  58. from which it is loaded.  It is the file to which the KB will be saved when 
  59. you click the Save button.  If the KB was loaded from an existing file then 
  60. that file is the DiskVersion, but if it was created from New, it will have 
  61. no DiskVersion.  If you try to Save a KB with no DiskVersion it will tell 
  62. you so: use SaveAs and make that file the new DiskVersion.
  63.  
  64.       You can have previous versions of your KB kept if you wish.  To do
  65. this, bring up the KB Area panel (click the 'KB Info' button) and click the 
  66. gadget on the right hand side labelled 'Backup each save' so it shows a 
  67. tick.  From then on, any simple Save will rename the original file by 
  68. appending date and time (yymmdd-hhmm) to its name, before saving the file. 
  69. Note: with large KBs this is an excellent way of filling up your hard disk!
  70.  
  71.       The KB Area Panel allows you to do other things and get detailed
  72. information on the KB.  (See Panels for details of what information is 
  73. available.)  You use this panel for the following operations.
  74.  
  75.       To rename a KB, bring up the KB Area Panel; its name is on the top
  76. row.  Simply alter it and hit OK.  Note: this alters only the internal name 
  77. of the KB, not its DiskVersion file.
  78.  
  79.       To resize a KB ... you should seldom need to do this since the KB
  80. grows automatically, and you should understand the concept of size of a KB. 
  81. You can only resize from version 1.04 onwards.  There are two parameters 
  82. you can set and another that shows its actual size, worked out from those 
  83. two.  The main one you would need to set is the Expansion Percentage, which 
  84. is the size of the main free space in the data structure area, e.g. 30%. 
  85. The Min DSA is the minimum size when the KB is relatively young; the size 
  86. is in longwords (1 LW = 4 bytes), e.g. 50,000.  The actual size (in bytes) 
  87. is shown below Min DSA on the KB Area Panel.  To resize, simply alter 
  88. Expansion Percentage and/or Min DSA, and hit the OK button.
  89.  
  90.       WARNING: This facility can be a bit fragile and can cause a crash in
  91. version 1.04.  This is because if the KB increases in size it moves in 
  92. memory and therefore all the pointers into it must all be changed.  If you 
  93. have several panels up that relate to a KB, e.g. attribute details, 
  94. relationship instance details, item types, etc. and increase the KB size 
  95. while they are up, then the panel does not realise the KB has moved and 
  96. when you click its OK button it stores information where the KB used to be. 
  97. For this reason, before you attempt to resize you should close down all 
  98. panels except that for the KB itself.
  99.  
  100.       To resize the Easel of a KB, hit the Easel button on the KB panel,
  101. alter the figures as needed, and hit OK.  The sizes are in 1/256ths of an 
  102. inch (ca. tenths of a millimetre) for an unzoomed easel.  Depth is the 
  103. number of bit planes: 3 gives 8 colours, 4 gives 16.
  104.  
  105.       To get rid of a KB, hit the Rid button on the KB panel.  You will be
  106. asked whether you are sure.
  107.  
  108.  
  109. PREFERENCES
  110.  
  111. When creating a new KB its size, the size of its main easel, and other 
  112. parameters are set by Preferences, which can be accessed via the Prefs 
  113. panel before hitting the 'New' button.  But you can also set up an 
  114. IstarPrefs file in the IstarSys: drawer, which will be read in when Istar 
  115. starts up.  This section tells you how to set up such a file; it is 
  116. relevant only to version 1.04 onwards.
  117.  
  118.       The IstarPrefs file contains a number of lines of text, each holding
  119. a number of CLI-type arguments.  Normally (unless you are nesting these 
  120. files; see below) the arguments can be supplied in any order and each that 
  121. is given will override its previous value.  If an argument is not given at 
  122. all, the standard value is used.
  123.  
  124.       The format is a list of keywords, most with an equals sign and a
  125. value after them, e.g. "W=640 NewKBName=MyKB".  The keywords, most of which 
  126. have an abbreviation, are:
  127.  
  128. NKB=NewKBName/k,        -  Name given to brand new KBs
  129. KX=KBExpansion/k/n,     -  Percentage eXpansion for DSA
  130. KZ=MinDSA/k/n,          -  Min DSA siZe in Longwords
  131. MRL=MaxRingLength/k/n,  -  Maximum ring length in KBs
  132.  
  133. W=EaselWidth/k/n,       -  Width in pixels of main Easel
  134. H=EaselHeight/k/n,      -  Height ditto
  135. D=EaselDepth/k/n,       -  Depth as number of bit planes
  136.  
  137. BAFont/k,               -  Name of font to be used for labels on main easel
  138. FHBA=BAFontHeight/k/n,  -  Its height in pixels
  139. QnFont/k,               -  Name of font to be used for user question panels
  140. FHQ=QnFontHeight/k/n,   -  Its height in pixels
  141. DocFont/k,              -  Name of font to be used in documents
  142. FHD=DocFontHeight/k/n,  -  Its height in pixels
  143.  
  144. PF=PrefsFile/k,         -  If this is given then this file is read
  145.  
  146. t_u/s,                  -  Trace user action routines
  147. t_m/s,                  -  Trace module activity
  148. t_e/s,                  -  Trace easel routines
  149. other/m,                -  A catch-all; ignore
  150.  
  151. (/k means it expects to be followed by an equals sign and value, /n means 
  152. that that value should be a number.  /s means it is a switch.)
  153.  
  154.       The PF or PrefsFile argument supplies the name of a preferences file
  155. to be read.  The arguments read from this file override any set prior to 
  156. reading the file and are in turn overridden by any set after reading. 
  157. Normally it will be on a line by itself.  But if there are several other 
  158. arguments in the same line then they are all applied after the file has 
  159. been read, perhaps overriding any that were read in this file.
  160.